package net.huashitong.ssydt.exam.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import net.huashitong.ssydt.exam.entity.SsExamInfo;
import net.huashitong.ssydt.exam.entity.SsExamTestSchedule;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.08.23
 */
@ApiModel(value = "ExamInfoVO", description = "我的考试")
public class ExamInfoVO implements Serializable {

    private static final long serialVersionUID = -7785390490770542417L;

    @ApiModelProperty(value = "考试类型")
    private String examType;//考试类型

    @ApiModelProperty(value = "考试省份")
    private String examProvince;//考试省份

    @ApiModelProperty(value = "考试城市")
    private String examCity;//考试城市

    @ApiModelProperty(value = "考试时间")
    @Pattern(message = "请输入正确的考试时间",
            regexp = "(^[0-9]{4}-(([1][0-2])|([0][1-9]))-(([0-2][0-9])|([3][01])))|(^[0-9]{4}-(([1][0-2])|([0][1-9])))|[\\s]*")
    private String examDate; //考试时间

    @ApiModelProperty(value = "考试范围")
    private String examRange;//考试范围


    public ExamInfoVO() {
    }

    public ExamInfoVO(SsExamInfo ssExamInfo) {
        this.examType = ssExamInfo.getExamType();
        this.examProvince = ssExamInfo.getExamProvince();
        this.examCity = ssExamInfo.getExamCity();
        this.examDate = ssExamInfo.getExamDate();
        this.examRange = ssExamInfo.getExamRange();
    }

    public ExamInfoVO(String formatNull) {
        this.examType = formatNull;
        this.examProvince = formatNull;
        this.examCity = formatNull;
        this.examDate = formatNull;
        this.examRange = formatNull;
    }

    public ExamInfoVO(SsExamTestSchedule schedule) {
        this.setExamType(schedule.getExamType());
        this.setExamProvince(schedule.getExamProvince());
        this.setExamCity(schedule.getExamCity());
        this.setExamDate(schedule.getExamDate());
        this.setExamRange(schedule.getExamRange());
    }

    public String getExamType() {
        return examType;
    }

    public void setExamType(String examType) {
        this.examType = examType;
    }

    public String getExamProvince() {
        return examProvince;
    }

    public void setExamProvince(String examProvince) {
        this.examProvince = examProvince;
    }

    public String getExamCity() {
        return examCity;
    }

    public void setExamCity(String examCity) {
        this.examCity = examCity;
    }

    public String getExamDate() {
        return examDate;
    }

    public void setExamDate(String examDate) {
        this.examDate = examDate;
    }

    public String getExamRange() {
        return examRange;
    }

    public void setExamRange(String examRange) {
        this.examRange = examRange;
    }
}
